package cn.lqz.bucttrain.enums;

/**
 * 座位类型枚举
 */
public enum SeatTypeEnum {
    BUSINESS(0,"商务座"),
    COMMON(1,"普通座");
    private Integer type;
    private String description;

    SeatTypeEnum(Integer type,String description){
        this.type = type;
        this.description = description;
    }

    public static SeatTypeEnum getByType(Integer type){
        for (SeatTypeEnum seatTypeEnum : SeatTypeEnum.values()) {
            if (seatTypeEnum.getType().equals(type)){
                return seatTypeEnum;
            }
        }
        return null;
    }
    public Integer getType(){
        return type;
    }
    public String getDescription(){
        return description;
    }
}
